package com.sunyard.pcc.core.service;

import com.sunyard.pcc.common.bo.SysRoleBO;
import com.sunyard.pcc.common.exception.PccCommonException;

import java.util.List;

/**
 * @Author: Hewei
 * @Description:
 * @Date: Created in 16:30 2018/2/27
 */
public interface RoleService {

    /**
     * 更新用户的权限列表
     * @param userId
     * @param roles
     * @return
     * @throws PccCommonException
     */
    Boolean updateUserRoles(Long userId, List<Long> roles) throws PccCommonException;

    /**
     * 批量添加用户角色关联数据
     * @param userId
     * @param roles
     * @return
     * @throws PccCommonException
     */
    Boolean addUserRolesBatch(Long userId, List<Long> roles) throws PccCommonException;


    /**
     * 根据用户编号获取用户对应角色列表
     * @param userId
     * @return
     * @throws PccCommonException
     */
    List<SysRoleBO> queryUserRoles(Long userId) throws PccCommonException;



}
